package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("empId") Long empId, @Param("roleIds") Long[] roleIds);

    void deleteRelation(Long id);

    void batchDelete(@Param("ids") Long[] ids);

    void batchDeleteRelation(@Param("ids") Long[] ids);

    Employee checkNameAndPassword(@Param("username") String username, @Param("password") String password);

    List<Employee> selectByKeywordAndDeptId(@Param("keyword") String keyword, @Param("deptId") Long deptId);

    Employee selectByName(String username);

    List<String> selectAllUsernames();

    void updateEmpStatus(Long id);
    List<Employee> selectByNoticeId(Long id);

    int countNoReadMessageById(Long id);
}